using System.Collections.Generic;

namespace MadLibrary.Text.EPub
{
    /// <summary>
    /// Encapsulates a NCX document.
    /// </summary>
    public class NcxDocument : IEnumerable<NavPoint>
    {
        internal NcxDocument()
        {
            NavigationMap = new List<NavPoint>();
        }

        /// <summary>
        /// Gets or sets the UID of the document.
        /// </summary>
        public string UID { get; internal set; }
        /// <summary>
        /// Gets or sets the creator of the document.
        /// </summary>
        public string Creator { get; internal set; }
        /// <summary>
        /// Gets or sets the depth of the document.
        /// </summary>
        // If anyone can explain to me what the hell that means, I'll be happy to hear.
        //  -Gilnaa
        public int Depth { get; internal set; }
        /// <summary>
        /// Gets or sets the total number of pages.
        /// </summary>
        public int TotalPageCount { get; internal set; }
        /// <summary>
        /// Gets or sets the maximum number of pages.
        /// </summary>
        public int MaxPageNumber { get; internal set; }

        /// <summary>
        /// Gets or sets the book title.
        /// </summary>
        public string DocumentTitle { get; internal set; }
        /// <summary>
        /// Gets or sets the book author.
        /// </summary>
        public string DocumentAuthor { get; internal set; }
        /// <summary>
        /// Gets or sets a list of nav points.
        /// </summary>
        public List<NavPoint> NavigationMap { get; internal set; }

        /// <summary>
        /// Gets the enumerator of the NavigationMap.
        /// </summary>
        /// <returns></returns>
        public IEnumerator<NavPoint> GetEnumerator()
        {
            return NavigationMap.GetEnumerator();
        }

        System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator()
        {
            return NavigationMap.GetEnumerator();
        }
    }
}